-
Notifications
You must be signed in to change notification settings - Fork 5
Add first version of createPodSandbox #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@mrunalp , PTAL. |
| } | ||
|
|
||
| runtime.RegisterRuntimeServiceServer(s, service) | ||
| runtime.RegisterImageServiceServer(s, service) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer to #12 if you're dealing with images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing out.
I have not reached that far yet. Currently, I am just trying to process each field inside PodSandboxConfig.
cmd/client/main.go
Outdated
| Flags: []cli.Flag{ | ||
| cli.StringFlag{ | ||
| Name: "config", | ||
| Value: "podsandboxconfig.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be named config.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
Signed-off-by: Haiyan Meng <hmeng@redhat.com>
cmd/client/podsandboxconfig.json
Outdated
| "requests": 200000000000 | ||
| } | ||
| }, | ||
| "lables": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
|
@mrunalp , I added a new commit to fix the problems you pointed out. PTAL. |
| logDir = fmt.Sprintf("/var/log/ocid/pods/%s", name) | ||
| } | ||
|
|
||
| // TODO: construct /etc/resolv.conf based on dnsOpts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to construct /etc/resolv.conf to be mounted. (I looked at existing kubelet code).
For e.g. create this file somewhere under the sandbox directory and add a bind mount to /etc/resolv.conf in the container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrunalp , sounds good.
Do you think I should work on it with a separate PR? I kind of want to do that.
Keeping rebasing the current PR on master involves merging conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind doing this in a later PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrunalp , great.
Then let me know if there is anything I should fix before the PR is ready to be merged.
I will start working on a new PR to parse dns options and cpu settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmeng-19 It is okay, I'll merge this and then we can address the TODOs in follow on PRs.
|
LGTM |
This PR implements the first version of
Server.CreatePodSandbox.It is not ready for merge.